package com.bw.mapper;

import com.bw.bean.Vo;
import com.bw.bean.Vo1;
import com.bw.bean.Vo3;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VoMapper {

    @Select("select s.name value2,\n" +
            "       sum(oi.original_amount) num1,\n" +
            "       count(oi.id) value1,\n" +
            "       count(oi.customer_id) value3,\n" +
            "       sum(oi.actual_amount) num2,\n" +
            "       sum(p.amount) num3\n" +
            "from order_info oi\n" +
            "         left join payment p on oi.id = p.order_info_id\n" +
            "         left join shop s on s.id = p.shop_id\n" +
            "where p.status=5\n" +
            "group by s.name;")
    List<Vo> getList();
    @Select(

    )
    List<Vo1> getList1();
    @Select(

    )
    List<Vo3> getList3();
}
